class AuthEntity < Grape::Entity
  expose :token, proc: ->(uid, _) {AuthDomain.gen_token(uid)}
end

class InvalidEntity < Grape::Entity
  expose :result, proc: ->(_, _) { :failure }
  expose :reason, if: :reason, proc: ->(_, options) { options[:reason] }
end

class SecretEntity < Grape::Entity
  expose :value, as: :code
end
